const express = require('express')
const router = express.Router()
// 引入校验规则
const expressJoi = require('@escook/express-joi')
const{reg_login_schema} = require('../schema/user.js')
// 引入路由处理函数
let routerHandler = require('../router_handler/user.js')



// 将请求挂载到router对象上
router.post('/reguser',expressJoi(reg_login_schema),routerHandler.reguser)
router.post('/login',expressJoi(reg_login_schema),routerHandler.login)

// 导出router
module.exports = router